<?php

App::uses('ExceptionRenderer', 'Error');

class AppExceptionRenderer extends ExceptionRenderer {
    
    private function show($error) {
        $ctrl = $this->controller;
        $ctrl->set('error', $error);
        echo $ctrl->render('/Errors/error400');
    }
    
    public function notFound($error) {
        $this->show($error);
    }
    
    public function missingController($error) {
        $this->show($error);
    }
    
    public function missingAction($error) {
        $this->show($error);
    }
    
}
